const JSEncrypt = require('jsencrypt');
// RSA加密函数
function rsaEncrypt(text, public_key) {
    const encrypt = new JSEncrypt();
    encrypt.setPublicKey(public_key);
    return encrypt.encrypt(text);
}
function get_requestStr(pageIndex, public_key) {
    timeStamp = Date.now();
    A = {
        "bz": "01",
        "xxzy": "",
        "fbdw": "",
        "pageIndex": 2,
        "sign": "72efb63b63ea9edd4445d2a16fd5d47d",
        "timeStamp": timeStamp
    }
    return rsaEncrypt(JSON.stringify(A), public_key)
}

console.log(get_requestStr(2));
